gtk-demo: Improve display of image sources
authorMatthias Clasen <mclasen@redhat.com>
Sun, 7 Jun 2020 02:06:58 +0000 (22:06 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 7 Jun 2020 02:12:12 +0000 (22:12 -0400)
Make the images expand to fill the space.

demos/gtk-demo/main.c

index f9ea82c9cd314a70606b56df5ceeda5501d77d7d..51846edaeb4482f0d975519e149489a9552bac73 100644 (file)
@@ -599,7 +599,7 @@ display_image (const char *resource)
 {
   GtkWidget *sw, *image;
 
-  image = gtk_image_new_from_resource (resource);
+  image = gtk_picture_new_for_resource (resource);
   gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
   gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
   sw = gtk_scrolled_window_new (NULL, NULL);